package com.wangy.activemq;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class FTest {

	public static void main(String[] args) {
	String http = "http://localhost:8080/sdfsdf";

	if(http.contains(":")){
		  Pattern p=Pattern.compile("(:\\d+)"); 
		  Matcher m=p.matcher(http);       
		  if(m.find()){
			  String res = m.group(1);
			  String target = res.substring(1);
		      System.out.println(target);    
		  }
	}
	}

}
